#ifndef __SLOTHTTPD_TYPES_HPP__
#define __SLOTHTTPD_TYPES_HPP__

#include <cstddef>

#include <boost/intrusive_ptr.hpp>
#include <boost/range/iterator_range.hpp>
#include <boost/asio.hpp>

namespace slothttpd {

class connection;
class wait_queue_node;
class wait_queue;

typedef boost::intrusive_ptr<connection>                    connection_ptr;
typedef boost::intrusive_ptr<wait_queue_node>               wait_queue_node_ptr;
typedef boost::iterator_range<boost::asio::mutable_buffer*> mutable_buffer_range_t;
typedef boost::iterator_range<boost::asio::const_buffer*>   const_buffer_range_t;

class char_range_t :
        public boost::iterator_range<char*>
{
public:
    inline char_range_t() :
        boost::iterator_range<char*>(nullptr, nullptr)
    {
    }
    
    inline char_range_t(char *first, char *last) :
        boost::iterator_range<char*>(first, last)
    {
    }
};

}

#endif
